package application.employee.repository;

import application.employee.model.Employee;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.Collection;

/**
 * 雇员 数据层接口
 *
 * @author roamer
 * @version V1.0
 * @date 2019-02-24 10:21
 */
public interface EmployeeRepository extends MongoRepository<Employee, String>, EmployeeRepositoryCustom {

    /**
     * 根据名称查询
     *
     * @param name 名称
     *
     * @return {@code Collection<Employee>}
     */
    Collection<Employee> queryByName(String name);

    /**
     * 根据ID查询
     *
     * @param id 雇员ID
     *
     * @return {@code Employee}
     */
    Employee queryById(String id);
}
